<?php
/**
 * 二维码管理
 * Created by PhpStorm
 * User: long
 * Date: 2019/11/29
 * Time: 14:14
 */

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;

class QRCodeController extends Controller
{
    public function __construct()
    {
        parent::__construct();
    }

    public function storeForeverCode()
    {
        return $this->app->qrcode->forever('121821u2189');
    }

    public function getCodeUrl()
    {
        return $this->app->qrcode->url('gQFQ8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyYU1xTlk4QXFkczMxMDAwMHcwN1UAAgQEuuBdAwQAAAAA');
    }

    public function getShortUrl()
    {
        return $this->app->url->shorten('http://wechat-api.yi-api.cn/api/wechat');
    }
}